package com.ruoyi.base.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.base.mapper.BaseMetaSpaceMapper;
import com.ruoyi.base.domain.BaseMetaSpace;
import com.ruoyi.base.service.IBaseMetaSpaceService;

/**
 * 值空间Service业务层处理
 * 
 * @author yepanpan
 * @date 2025-02-24
 */
@Service
public class BaseMetaSpaceServiceImpl implements IBaseMetaSpaceService 
{
    private static final Logger log = LoggerFactory.getLogger(BaseMetaSpaceServiceImpl.class);

    @Autowired
    private BaseMetaSpaceMapper baseMetaSpaceMapper;

    /**
     * 查询值空间
     * 
     * @param id 值空间主键
     * @return 值空间
     */
    @Override
    public BaseMetaSpace selectBaseMetaSpaceById(Long id)
    {
        return baseMetaSpaceMapper.selectBaseMetaSpaceById(id);
    }

    /**
     * 查询值空间列表
     * 
     * @param baseMetaSpace 值空间
     * @return 值空间
     */
    @Override
    public List<BaseMetaSpace> selectBaseMetaSpaceList(BaseMetaSpace baseMetaSpace)
    {
        return baseMetaSpaceMapper.selectBaseMetaSpaceList(baseMetaSpace);
    }

    /**
     * 新增值空间
     * 
     * @param baseMetaSpace 值空间
     * @return 结果
     */
    @Override
    public int insertBaseMetaSpace(BaseMetaSpace baseMetaSpace)
    {
        baseMetaSpace.setCreateTime(DateUtils.getNowDate());
        return baseMetaSpaceMapper.insertBaseMetaSpace(baseMetaSpace);
    }

    /**
     * 修改值空间
     * 
     * @param baseMetaSpace 值空间
     * @return 结果
     */
    @Override
    public int updateBaseMetaSpace(BaseMetaSpace baseMetaSpace)
    {
        baseMetaSpace.setUpdateTime(DateUtils.getNowDate());
        return baseMetaSpaceMapper.updateBaseMetaSpace(baseMetaSpace);
    }

    /**
     * 批量删除值空间
     * 
     * @param ids 需要删除的值空间主键
     * @return 结果
     */
    @Override
    public int deleteBaseMetaSpaceByIds(Long[] ids)
    {
        return baseMetaSpaceMapper.deleteBaseMetaSpaceByIds(ids);
    }

    /**
     * 删除值空间信息
     * 
     * @param id 值空间主键
     * @return 结果
     */
    @Override
    public int deleteBaseMetaSpaceById(Long id)
    {
        return baseMetaSpaceMapper.deleteBaseMetaSpaceById(id);
    }


}
